<template>
    <Modal v-model="setModalStatus" class="pages-home-homeIndex-QaqEarningModal" :mask-closable="false"
           @on-cancel="cancelModalBtn" class-name="vertical-center-modal">

        <p slot="header" style="color:#f60;text-align:center">
            <Icon type="information-circled"></Icon>
            <span>问答收益详情</span>
        </p>

        <div style="min-height: 100px; max-height: 240px;overflow: auto;">

            <p v-if="qaqList.length == 0" style="padding: 40px;text-align: center;">暂无数据</p>
            <ul v-else >
                <li v-for="qaq in qaqList">

                </li>
            </ul>

        </div>

        <div slot="footer">
            <button class="btn btn-primary" @click="cancelModalBtn">我知道了</button>
        </div>

    </Modal>
</template>

<script type="text/ecmascript-6">

    import getData from '../../../api/getData'

    export default {
        props: ['modal-status'],
        data: function () {
            return {
                qaqList: []
            }
        },
        computed: {
            setModalStatus(){
                return this.modalStatus;
            }
        },
        mounted(){
            this.getQAQuestion();
        },
        methods: {

            cancelModalBtn: function () {
                this.isVerified = false;
                this.formValidate = {
                    mobile: '',
                    code: '',
                    newPWD: ''
                };
                this.$emit("close-modal");
            },

            //查看问答收益
            getQAQuestion: function(){
                var self = this;
                getData.post("getQAQuestion").then(function (response) {
                	if(response.data.code == 0){
                        var tempData = response.data.data;
                        self.qaqList = tempData ? tempData : [];
                    }else{
                        self.$Message.info( response.data.msg ? response.data.msg : '网络错误，请稍后重试' );
                    }

                }).catch(function (response) {
                    self.$Message.info('网络错误，请联系客服');
                });
            }

        },
        components: {}
    }
</script>

<style scoped lang="scss">
    .pages-home-homeIndex-QaqEarningModal {

    }
</style>

